<template>
  <div class="homeBar">
    <div class="warp">
      <div class="left">您好，请先 <span @click="gotoLogin('/login',0)">登录</span> 或 <span @click="gotoLogin('/login',1)">注册</span></div>
      <div class="left"></div>
      <div class="center">
        <el-input placeholder="请输入搜索内容"></el-input>
        <div class="btn"><span class="el-icon-search"></span>搜索</div>
      </div>
      <div class="right">
        <span>动态</span>
        <span>消息</span>
      </div>
    </div>
  </div>
</template>

<script>
import {mapGetters} from 'vuex'
export default {
  computed:{

  },
  methods:{
    gotoLogin(path,type){
      this.$router.push({path:path,query:{type:type}})
    }
  }
}
</script>

<style lang="scss" scoped>
.homeBar{
  width: 100%;
  line-height: 60px;
  height: 60px;
  background-color: #606266;
  
  .warp{
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    .right{
      display: flex;
      width: 110px;
      justify-content: space-between;
      span{
        cursor: pointer;
        font-size: 18px;
      }
    }
    .center{
      height: 36px;
      border-radius: 20px;
      overflow: hidden;
      display: flex;
      align-items: center;
      ::v-deep .el-input__inner{
        height: 36px;
        border-radius: 0;
      }
      ::v-deep .el-input{
        width: 190px;
      }
      .btn{
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        height: 35.6px;
        width: 80px;
        background-color: white;
        color: #606266;
        box-shadow: inset 0 0 2.5px 0 #606266;
      }
    }
    .left{
      span{
        text-decoration: underline;
        cursor: pointer;
      }
    }
  }
}
</style>